<template>
  <view class="container">
    <view class="service-intro">
      <view class="intro-title">专业定制开发服务</view>
      <view class="intro-description">
        提供一站式软件开发服务，从需求分析到产品上线，全程为您保驾护航。
      </view>
    </view>

    <view class="service-categories">
      <view class="category-item" v-for="(category, index) in categories" :key="index">
        <image class="category-icon" :src="category.icon"></image>
        <view class="category-title">{{category.title}}</view>
      </view>
    </view>

    <view class="service-list">
      <view class="service-item" v-for="(service, index) in services" :key="index">
        <view class="service-header">
          <view class="service-title">{{service.title}}</view>
          <view class="service-tag">{{service.tag}}</view>
        </view>
        <view class="service-description">{{service.description}}</view>
        <view class="service-features">
          <view class="feature-item" v-for="(feature, idx) in service.features" :key="idx">{{feature}}</view>
        </view>
      </view>
    </view>

    <view class="contact-button" @click="navigateToContact">
      立即咨询
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        categories: [
          {
            title: "小程序开发",
            icon: "/static/services/miniprogram.webp"
          },
          {
            title: "Web应用",
            icon: "/static/services/web.webp"
          },
          {
            title: "移动应用",
            icon: "/static/services/mobile.webp"
          },
          // {
          //   title: "定制开发",
          //   icon: "/static/services/custom.png"
          // }
        ],
        services: [
          {
            title: "小程序定制开发",
            tag: "热门",
            description: "根据您的需求，开发功能丰富、体验优良的微信小程序。",
            features: [
              "电商小程序开发",
              "企业展示小程序",
              "服务预约小程序",
              "社交互动小程序"
            ]
          },
          {
            title: "Web应用开发",
            tag: "推荐",
            description: "开发响应式网站和Web应用，适配各种设备，提升用户体验。",
            features: [
              "企业官网开发",
              "电商网站开发",
              "管理系统开发",
              "在线教育平台"
            ]
          },
          {
            title: "需求分析与规划",
            tag: "专业",
            description: "帮助您梳理需求，制定合理的开发计划和技术方案。",
            features: [
              "需求调研与分析",
              "产品规划与设计",
              "技术方案制定",
              "项目进度管理"
            ]
          }
        ]
      }
    },
    onLoad() {

    },
    methods: {
      navigateToContact() {
        uni.navigateTo({
          url: '/pages/contact/contact'
        })
      }
    }
  }
</script>

<style scoped>
  .container {
    padding: 20px;
    box-sizing: border-box;
  }

  .service-intro {
    text-align: center;
    padding: 30rpx 0;
    border-bottom: 1px solid #eee;
  }

  .intro-title {
    font-size: 40rpx;
    font-weight: bold;
    margin-bottom: 20rpx;
  }

  .intro-description {
    font-size: 28rpx;
    color: #666;
    line-height: 1.5;
  }

  .service-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin-top: 30rpx;
    margin-bottom: 30rpx;
  }

  .category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20rpx;
    width: 180rpx;
  }

  .category-icon {
    width: 100rpx;
    height: 100rpx;
    margin-bottom: 10rpx;
  }

  .category-title {
    font-size: 28rpx;
    text-align: center;
  }

  .service-list {
    margin-top: 30rpx;
  }

  .service-item {
    background-color: #f9f9f9;
    padding: 20rpx;
    border-radius: 10rpx;
    margin-bottom: 20rpx;
  }

  .service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10rpx;
  }

  .service-title {
    font-size: 30rpx;
    font-weight: bold;
  }

  .service-tag {
    background-color: #007AFF;
    color: white;
    font-size: 24rpx;
    padding: 5rpx 10rpx;
    border-radius: 15rpx;
  }

  .service-description {
    font-size: 28rpx;
    color: #333;
    margin-bottom: 10rpx;
    line-height: 1.5;
  }

  .service-features {
    display: flex;
    flex-wrap: wrap;
  }

  .feature-item {
    background-color: #eee;
    padding: 5rpx 15rpx;
    border-radius: 15rpx;
    margin-right: 15rpx;
    margin-bottom: 15rpx;
    font-size: 26rpx;
    color: #666;
  }

  .contact-button {
    background-color: #007AFF;
    color: white;
    text-align: center;
    padding: 20rpx 0;
    border-radius: 10rpx;
    font-size: 32rpx;
    margin-top: 40rpx;
  }
</style>